#include <cstdio>
#include <cstring>
using namespace std;

#define CANDIDATE_NUMBER 3
#define VOTE_SIZE 20

int main()
{
    struct person {
        char name[20];
        int count;
    }leader[3] = {"Li", 0, "Zhang", 0, "Fun", 0};

    int num;
    char vote[VOTE_SIZE];
    scanf(" %d", &num);
    for (int i = 0; i < num; i++) {
        scanf(" %s", vote);
        for (int j = 0; j < CANDIDATE_NUMBER; j++) {
            if (strcmp(vote, leader[j].name) == 0)
                leader[j].count++;
        }
    }

    for (int i = 0; i < CANDIDATE_NUMBER; i++)
        printf("%s:%d\n", leader[i].name, leader[i].count);
    
    return 0;
}